package com.example.onlineeducation.mapper

import com.example.onlineeducation.data.json.UploadFileResultJson
import com.yc.jetpacklib.extension.ycIsEmpty
import com.yc.jetpacklib.extension.ycToNoEmpty
import com.yc.jetpacklib.mapper.IMapper

class UploadMultipleFileMapper : IMapper<List<UploadFileResultJson?>?, List<String>?> {
    override fun map(input: List<UploadFileResultJson?>?): List<String>? {
        return if (input.ycIsEmpty()) {
            null
        } else {
            input!!.map {
                it?.savePath.ycToNoEmpty()
            }
        }

    }
}

